Data saving method and external storage device

ABSTRACT

A data saving method, apparatus and computer program which operates in an information processing system including a first external storage device, a host device which performs data input and/or output operations to and/or from the first external storage device and a second external storage device. A connection is formed between the first external storage device and the second external storage device. The second external storage device is not connected to the host device. An operation is performed of automatically saving data from the first external storage into the second external storage device via the connection formed between the first external storage device and the second external storage device. The saving is performed based on configuration information stored in the first external storage device. The configuration information includes information for designating an execution start time of saving data to the second external storage device, and at least one of a data storing area and a data set name in the second external storage device at which stored data is to be stored and information for indicating at least one type of second external storage device.

FIELD OF THE INVENTION

The present invention relates to a data saving data backup technique.More particularly, the present invention relates to a data saving, databackup, technique in an external storage device which is shared by twoor more host devices.

BACKGROUND OF THE INVENTION

In recent years, with the trend of nonstop operation of a computersystem, the importance of data backup is indispensable for a safeoperation of the computer system. Consequently, various methods forperforming data backup have been proposed.

For example, Japanese Patent Application No. 5-81147 discloses anautomatic saving and restoring method for a volatile storage. The methoddetects whether a residual capacity of exists power in a power supply bya residual capacity detector and transfers the contents of the volatilestorage to a non-volatile storage when the residual capacity is equal toor lower than a predetermined level. Japanese Patent Application No.5-120110 discloses an automatic backup system for a file. The systemperforms data backup of a file which has been previously designated whencommunications via a Local Area Network (LAN) is not heavy. JapanesePatent Application No. 6-4223 discloses a disk copying system forexecuting a disk (storage medium) copy from a device suspected to havefailed to another device when the copying is judged to be necessary dueto the identification of the device suspected to have failed. JapanesePatent Application No. 6-139027 discloses a data backup technique for adisk array system. In a configuration having multiple disk drivesbecoming a disk array, spare drives, and a backup device are providedand controlled by a disk array controller. The spare drive is used as adata transfer buffer when transferring data transfer from the diskdrives to the backup device. Japanese Patent Application No. 6-168080discloses a technique for preventing old backup data from beingerroneously used by recording the latest data update time and backupcompletion time when data backup for each of main and spare disks isperformed in a data backup system. Thus, this technique in accordancewith a setting of a switch by a job terminating program, the latest dataupdate time and the backup completion time are collated with each backupfrom either the main or spare disk. Japanese Patent Application No.6-309209 discloses a file backup method which provides a flag area in apart of file management information for specifying whether an automaticbackup is necessary or not with respect to a file to be stored in anauxiliary storage. Thus, a backup is automatically performed when theflag area in the file management information specifies that a backup isnecessary. Japanese Patent Application No. 8-212142 discloses a databackup system for a database which performs a data backup using a backupcontrol file and a history file. Japanese Patent Application No. 9-50394discloses an automatic data saving system in which an automaticactivating unit, a saving unit, and the like are provided in a computerto which a direct access storage and a magnetic tape device areconnected. Data backup is performed by a job control statementrequesting a saving process created by the saving unit. Japanese PatentApplication No. 9-101912 discloses a differential backup method whichperforms differential backup by providing a differential managingmechanism for recording/managing a backup generation IC and the like foreach block in an external storage as a part of the kernel in which anoperating system exists. Japanese Patent Application No. 10-283121discloses a data backup system which executes a data backup withoutusing a CPU, main memory unit or a system bus by judging which one ofthe main memory unit and local memory access on a standard I/O bus is tobe performed by a bus controller. Japanese Patent Application NO.8-234916 discloses automatic backup system without occupying a hostdevice. Japanese Patent Application No. 7-239759 discloses backup systemrecording information of the disk array. Japanese Patent Application No.7-200191 discloses disk array device which have a timer. Japanese PatentApplication No. 7-93101 discloses backup system without using a bus.Japanese Patent Application No. 4-311219 discloses backup system withoutinterfering a host device.

The above described conventional techniques except those described inJapanese Patent Application No. 6-4223 and Japanese Patent ApplicationNo. 6-139027 have a disadvantage in that a load is applied to the hostdevice since the data backup is executed by processing performed by thehost device. The conventional technique described in Japanese PatentApplication No. 6-4223 saves data in a device reserved against failuresby a disk error collecting unit and a medium copying unit. Thus, thisconventional technique has a disadvantage that a motive for data savingis limited to a time only when a device is suspected to have failedbeing that errors are anticipated to occur frequently. The conventionaltechnique described in Japanese Patent Application No. 6-139027 has toobtain information such as application range of a file system from ahost computer. Accordingly, the advantage is that backup cannot beperformed automatically.

SUMMARY OF THE INVENTION

The present invention provides a data saving method, apparatus andcomputer program which operates in an information processing systemincluding a first external storage device and a host device whichperforms data input and/or output operations to and/or from the firstexternal storage device. In the present invention, a connection isformed between the first external storage device and a second externalstorage device. The second external storage device is not connected tothe host device. The present invention performs an operation ofautomatically saving data from the first external storage into thesecond external storage via the connection formed between the firstexternal storage device and the second external storage device.

The saving is performed based on configuration information stored in thefirst external storage device. The configuration information includesinformation for designating an execution start time of saving data tothe second external storage device, and at least one of a data storingarea and a data set name in the second external storage device at whichstored data is to be stored and information for indicating at least onetype of second external storage device.

The present invention provides an operation of detecting a predeterminedcondition. The saving operation is performed in response to detection ofthe predetermined condition. The predetermined condition is at least oneof a predetermined period of time, a predetermined number of datainput/output operations, and a failure of the first external storage.

BRIEF DESCRIPTION OF THE DRAWINGS

The scope of the present invention will be apparent from the followingdetailed description, when taken in conjunction with the accompanyingdrawings, and such detailed description and specific examples, whileindicating preferred embodiments of the invention, are given by way ofillustration only, since various changes and modifications within thespirit and scope of the invention will become apparent to those skilledin the art from this detailed description, in which:

FIG. 1 is a block diagram illustrating the hardware configuration of aninformation processing system including external storage devices of thepresent invention;

FIG. 2 is a block diagram illustrating the hardware configuration of adisk array subsystem as an example of the external storage device of thepresent invention;

FIG. 3 is a conceptual diagram illustrating the structure of aconfiguration information table as one of pieces of control informationof the present invention;

FIG. 4 is a conceptual diagram illustrating the configuration of a timerof a service processor of the present invention;

FIG. 5 is a conceptual diagram illustrating the configuration of abackup information table as one of pieces of information of the presentinvention;

FIG. 6 is a flowchart illustrating the operation of an external storagedevice of the present invention;

FIG. 7 is a flowchart illustrating the operation of an external storagedevice of the present invention;

FIG. 8 is a flowchart illustrating the operation of an external storagedevice of the present invention;

FIG. 9. Is a flowchart illustrating the operation of an external storagedevice of the present invention;

FIG. 10 is a flowchart illustrating the operation of an external storagedevice of the present invention;

FIG. 11 is a flowchart illustrating the operation of an external storagedevice of the present invention;

FIG. 12 is a flowchart illustrating the operation of an external storagedevice of the present invention; and

FIG. 13 is a flowchart illustrating the operation of an external storagedevice of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a block diagram illustrating an example of a hardwareconfiguration of an information processing system including externalstorage devices which perform the data saving operation of the presentinvention. The information processing system includes a large generalpurpose computer 1, a personal computer 4, cables 10 to 14, an externalstorage device 20, and a data backup-use external storage device 30. Theexternal storage device 20 is connected by input/output (I/O) ports tochannels 2 and 3 of the larger general purpose computer 1 and diskinterface (I/F) 5 and 6 of the personal computer 4 via the cables 10 to13. The external storage device 20 is also connected by an I/O port tothe data back-up external storage device 30 via the cable 14. Asrepresentative examples of the external storage device 20, there are amagnetic disk subsystem such as a disk array, a semiconductor storagesubsystem, an optical disk subsystem, and the like. As representativeexamples of the data backup-use external storage device 30, there are amagnetic tape subsystem, magnetic tape library subsystem, optical disklibrary subsystem, and the like in addition to those illustrated asrepresentative examples of the external storage 20.

A disk array subsystem including multiple magnetic disk devices is usedas an example of the external storage device 20. FIG. 2 is a blockdiagram illustrating an example of the hardware configuration of a diskarray subsystem 21 as an example of the external storage device 20 ofthe present invention as illustrated in FIG. 1. The disk array subsystem21 includes a service processor 22, channel interface controller 41 to45 (I/O ports), buses 50 and 51, a shared memory 60, a cache 70, driveinterface controllers 81 to 84, and disk groups 91 and 92 each includingmultiple magnetic disk devices.

The service processor 22 has functions to set information necessary toperform automatic data backup which will be described below and to writethe information into the shared memory 60 via the bus 50. The channelinterface controllers 41 to 45 have functions to perform execution ofcommands from the large general purpose computer 1 and the personalcomputer 4 via the cables 10 to 14, data transfer between the largegeneral purpose computer 1, the personal computer 4, and the databackup-use external storage device 30 and the cache 70 using the bus 51,and the issue of commands to the data backup-use external storage device30. In order to realize the functions above, the channel interfacecontrollers 41 to 45 refer to and update information on the sharedmemory 60 via the bus 50 and communication with the drive interfacecontrollers 81 to 84 and the service processor 22.

The bus 50 is a communication control line connecting the channelinterface controllers 41 to 45, the shared memory 60, the driveinterface controllers 81 to 84, and the service processor 22. The bus 50is used to perform the communication among the channel interfacecontrollers 41 to 45, the drive interface controllers 81 to 84 and theservice processor 22 and reference/update of information between thechannel interface controllers 41 to 45, the drive interface controllers81 to 84, the service processor 22 and the shared memory 60.

The bus 51 is used for data transfer from the large general purposecomputer 1 and the personal computer 4 to the cache 70 via the cables 10to 13 and the channel interface controllers 41 to 44, data transfer fromthe cache 70 to the large general purpose computer 1 and the personalcomputer 4 via the cables 10 to 13 and the channel interface controllers41 to 44, data transfer from the cache 70 to the data backup-useexternal storage device 30 via the channel interface controller 45 andthe cable 14, data transfer from the cache 70 to the disk groups 91 and92 via the drive interface controllers 81 to 84, and data transfer fromthe disk groups 91 and 92 to the cache 70 via the drive interfacecontrollers 81 to 84.

The shared memory 60 is a nonvolatile memory which stores informationnecessary for the channel interface controllers 41 to 44, the driveinterface controllers 81 to 84, and the like to operate, informationused for operating the invention that will be described below, andconfiguration information from the service processor 22 that will bedescribed below. The cache 70 is a memory for temporarily storing writedata from the large general purpose computer 1 and the personal computer4 and read data from the disk groups 91 and 92.

The drive interface controllers 81 to 84 refer to and update informationon the shared memory 60 using the bus 50 in response to requests fromthe channel interface controllers 41 to 45, thereby reading data fromthe disk groups 91 and 92 into the cache 70 and writing data from thecache 70 onto the disk groups 91 and 92. The disk groups 91 and 92 arearrayed disks which retain data written from the large general purposecomputer 1 and the personal computer 4 into the cache 70.

FIG. 3 is a conceptual diagram illustrating an example of the structureof a configuration information table 100 which is one of the pieces ofcontrol information used to implement the data saving operation of thepresent invention. The contents of the configuration information table100 are set by the service processor 22. After completion of thesetting, the service processor 22 writes the configuration informationtable 100 in the shared memory 60. The configuration information table100 in the shared memory 60 is referred to mainly by the channelinterface controllers 41 to 45.

An example of the structure of the configuration information table 100will be explained in more detail. The configuration information table100 includes volume information 101, a backup channel interface flag102, and backup information 103. The number of volumes 110 is the numberof volumes in the disk array subsystem 21. The backup channel interfaceflag 102 illustrates the channel interface controllers 41 to 45 to whichthe data backup-use external storage device 30 is connected via thecable 14. The backup channel interface flag 102 is constructed by unitsof bits in which bit 0 denotes the channel interface controller 41, bit1 denotes the channel interface controller 42, and so on. In the backupchannel interface flag 102, bits in two or more positions can be set to1.

The backup information 103 includes by a backup object volume address120, a backup channel interface controller name 121, a data backup-useexternal storage device address 122, a data backup-use external storagedevice volume name 123, and a data backup start time 124. When two ormore backup object volume addresses 120 exist, each entry includes thebackup object volume address 120, the backup channel interfacecontroller name 121, the data backup-use external storage device volumename 123, and the data backup start time 124. The number of such entriescorresponds to the number of backup object volume addresses 120 exist.In FIG. 3, in order to simplify the explanation of the embodiment, anexample in which only one backup object volume address 120 exists isillustrated.

FIG. 4 is a conceptual diagram illustrating an example of theconfiguration of the service processor 22 including a timer 130, whichis used to implement the data saving operation of the present invention.The timer 130 is controlled by the hardware existing in the serviceprocessor 22. The timer 130 serves as a trigger indicating that apredetermined condition has occurred, upon which the data backup isstarted. When the value indicated by the timer 130 coincides with thedata backup start time 124 in the backup information 103 in theconfiguration information table 100, the service processor 22 instructsthe channel interface controllers 41 to 45 to start the data backup.

The service processor 22 is constructed by, for example, an informationprocessing device such as a personal computer and a work station and hasthe configuration illustrated in FIG. 4 as an example. For instance, amicroprocessor (MPU) 22 b, a main storage 22 c, and a bus bridge 22 dare connected via a system bus 22 a. Further, a calendar IC 22 f whichfunctions as the timer 130, a secondary storage device 22 g, a userinterface 22 h consisting of a display, a keyboard, etc., externalconnection I/F 22 i used for the connection with the disk arraysubsystem 21, and the like are connected to the bus bridge 22 d via ageneral bus 22 e. In the main storage 22 c, a general purpose operatingsystem (OS) 22 j, a configuration information setting program 22 k, aconfiguration information table 22 m (100), and the like are stored. Anoperation of the present invention such as that illustrated in theflowchart in FIG. 6 will be described below.

FIG. 5 is a conceptual diagram illustrating an example of the structureof a backup information table 140. The backup information table 140exists in each of the channel interface controllers 41 to 45 or on theshared memory 60. The backup information table 140 is constructed toinclude a device type flag 141, a volume name check flag 142, a currentvolume name 143, and an MT mounting waiting flag 144. The number ofbackup information tables 140 corresponds to the device addresses of thedata backup-use external storage device 30 connected via the cable 14.

The device type flag 141 includes a disk flag 151 and an MT flag 152.The disk flag 151 is set to 1 when the data backup-use external storagedevice 30 is any of a magnetic disk subsystem such as a disk array, asemiconductor storage subsystem, an optical disk subsystem, or anoptical disk library subsystem and set to 0 when the data backup-useexternal storage device 30 is a subsystem other than any of theabove-mentioned subsystems. The MT flag 152 is set to 1 when the databackup-use external storage device 30 is a magnetic tape subsystem or amagnetic tape library subsystem and set to 0 when the data backup-useexternal storage device 30 is a subsystem other than the above-mentionedsubsystems.

The volume name check flag 142 is set to 1 when a check of the diskvolume name or magnetic tape volume name has been completed and set to 0when the data backup is completed. Generally, a single volume name isgiven to a disk device volume, while a single volume name is given to avolume of magnetic tape.

The current volume name 143 illustrates a name of a disk volume or amagnetic tape volume to which the data backup is being performed atpresent. The MT mounting waiting flag 144 is set to 1 in a state that amagnetic tape volume is waiting for being mounted on a magnetic tapedevice and set to 0 in a state other than the above.

An example of the processings performed by the service processor 22 isillustrated in the flowchart of FIG. 6. This flowchart will be explainedby referring to FIGS. 2 to 4. The flowchart may, for example, correspondto a computer program executable by a computer. The computer programcan, for example, be stored on a storage medium such as semiconductormemory, floppy disk, CD ROM, etc., and installed to the memory of thecomputer. The computer program can alternatively be provided to thecomputer by a network connected to the computer such as, for example,local area network, internet, etc. Each of the steps of the flowchartcan, for example, correspond to one or more instructions of the computerprogram.

As per the above, FIG. 6 illustrates a processing flow of the serviceprocessor 22. However, in the following description in order to simplifythe explanation, the channel interface controller 45 will be set as thename of the backup channel interface controller 121 in the backupinformation 103.

First, it is determined whether a configuration information settingrequest has been issued (step 200) . The configuration informationsetting request is a request for setting a series of information of theconfiguration information table 100. If a configuration informationsetting request has been issued as per step 200, processing proceeds tostep 206. If no configuration information setting request has beenissued as per step 200, processing proceeds to step 201. In step 201, acheck is performed to determine whether the present time is a databackup start time or not. More specifically, a determination whether thedata backup start time 124 in the backup information 103 coincides withthe value of the timer 130 is performed. If the present time is not thedata backup start time as per step 201, processing proceeds to step 204.If the present time is the data backup start time as per step 201,processing proceeds to step 202. In step 202, the backup channelinterface controller name 121 in the backup information 103 in theconfiguration information table 100 is extracted and the channelinterface controller 45 indicated with the backup channel interfacecontroller name 121 is instructed via the bus 50 to back up the data atthe backup object volume address 120. More specifically, the channelinterface controller 45 is instructed via the bus 50 to back up the dataat the backup object volume address 120.

Next, in step 203, a determination whether the execution of the databackup instruction given to the channel interface controller 45 has beenterminated normally is performed. If the execution of the data backupinstruction has been terminated normally as per step 203, processingproceeds to step 204. A determination whether there is a volume forwhich data backup has been instructed before is performed. If there isno volume for which data backup has been instructed before as per step204, processing returns to step 200. If there is a volume for which databackup has been instructed before as per step 204, processing proceedsto step 205. In step 205, a determination whether the data backup of thevolume for which the data backup has been instructed before has beennormally terminated is performed. If the data backup of the volume forwhich data backup has been instructed before has been terminatednormally as per step 205, processing returns to step 200. If the databackup of the volume for which data backup has been instructed beforehas not been terminated normally as per step 205, processing proceeds tostep 211.

The configuration information setting request as per step 200 isexplained as follows. In step 206, the setting of the backup channelinterface flag 102 is requested and the setting information iscollected. In the embodiment, the backup channel interface flag 102 isset to the channel interface controller 45. The setting of the backupinformation 103 is requested and the backup information 103 which hasbeen set is collected in step 207. In the embodiment, the channelinterface controller 45 is set in the backup channel interfacecontroller name 121 in the backup information 103.

The information of the configuration information table 100 which hasbeen set is checked in step 208. More specifically, the backup channelinterface flag 102 and the backup channel interface controller name 121in the backup information 103 are checked for validity. If the check ofthe information in step 208 which has been set is not OK, processingreturns to step 206. If the check of the information which has been setis OK in step 208, processing proceeds to step 209. In step 209, theconfiguration information table 100 is written into the shared memory 60via the bus 50.

In step 210, whether the configuration information table 100 has beencorrectly written into the shared memory 60 is checked. If theconfiguration information table 100 has been correctly written into theshared memory 60 in step 210, processing proceeds to step 212. If theconfiguration information table 100 has not been correctly written intothe shared memory 60 in step 210, processing proceeds to step 211. Instep 211, it is instructed via the bus 50 to report an error to thechannel interface controllers 41 to 44 other than the channel interfacecontroller (the channel interface controller 45 in the embodiment)indicated by the backup channel interface controller name 121. Afterthat, processing returns to step 200.

After the configuration information table 100 has been correctly writteninto the shared memory 60 in step 210, rebooting by turning the power ofthe external storage device 20 from OFF to ON is performed in step 212,thereby making the channel interface controllers 41 to 45 collect theconfiguration information table 100 on the shared memory 60. In step213, a check is made to see whether or not an error has occurred in therebooting which has been made by turning the power source of theexternal storage 20 from OFF to ON. If an error has occurred in step213, the routine proceeds to step 211. If no error has occurred in step213, the routine returns to step 200.

An example of the operations performed as a result of the processing ofthe channel interface controllers 41 to 45 are illustrated in theflowcharts in FIGS. 7 to 13. These flowcharts will be explained by usingFIGS. 1 to 5. Each of the flowcharts may, for example correspond to acomputer program executed by a computer. The computer program can, forexample, be stored on a storage medium such as semiconductor memory,floppy disk, CD ROM, etc., and installed to the memory of the computer.The computer program can alternatively be provided to the computer by anetwork connected to the computer such as, for example, local areanetwork, internet, etc. Each of the steps of the flowchart can, forexample, correspond to one or more instructions of the computer program.

Although the channel interface controllers 41 to 45 have the threeprocessing functions as mentioned above, the data backup processingperformed by the data backup-use external storage device 30 will beexplained below. In the embodiment of the present invention, to simplifythe explanation, a case will be described below in which the databackup-use external storage device 30 is connected to the channelinterface controller 45 via the cable 14. The number of the backupobject volume addresses 120 in the backup information 103 in theconfiguration information table 100 is one. That is, there is a singleentry including the backup object volume address 120, the backup channelinterface controller name 121, the data backup-use external storagedevice address 122, the data backup-use external storage device volumename 123, and the data backup start time 124. The backup channelinterface controller name 121 and the backup channel interface flag 102are set to the channel interface controller 45.

First, the flowchart in FIG. 7 will be explained. Prior to step 301monitoring is performed to determine whether an input/output (I/O)request has been received (step 300A). If an I/O request has beenreceived then the I/O request is performed (step 300B). If no I/Orequest has been received or the I/O request has been performed, thenprocessing proceeds to step 301. In step 301, a determination whether anotification on completion of data reading from the disk groups 91 and92 has been sent from the drive interface controllers 81 to 84 isperformed. If no data reading completion notification has been sent fromthe drive interface controllers 81 to 84 in step 301, the configurationinformation table 100 on the shared memory is read in step 302. In step303, a determination whether the backup channel interface flag 102 ofany of the channel interface controllers (any of the channel interfacecontrollers 41 to 45) is 1 is performed. If none of the channelinterface flags 102 is 1 as per step 303, the routine returns to step301. Since the backup channel interface flag 102 is set to the channelinterface controller 45, processing proceeds to step 304.

In step 304, a check is performed to determine whether there is a databackup request from the service processor 22. If no data backup requesthas been made from the service processor 22 as per step 304, processingreturns to step 301. If the data backup request has been performed fromthe service processor 22 as per step 304, processing proceeds to step305. The data backup-use external storage device address 122 in thebackup information 103 is acquired in step 305 and processing proceedsto step 306. In step 306, the device type information at the databackup-use external storage device address 122 is acquired via the cable14. In step 307, a check is performed to determine whether the devicetype information at the data backup-use external storage device address122 has been acquired. If the acquisition of the device information atthe data backup-use external storage device address 122 has failed asper step 307, processing proceeds to step 312. If the acquisition of thedevice information at the data backup-use external storage deviceaddress 122 has succeeded in step 307, processing proceeds to step 308.

In step 308, a determination whether the device type is that of a disksystem is performed. The device type of the disk system in step 308 is amagnetic disk subsystem such as a disk array, semiconductor storagesubsystem, optical disk subsystem, optical disk library subsystem, orthe like. If the device type is not that of the disk system in step 308,processing proceeds to step 310. If the device type is that of the disksystem in step 308, processing proceeds to step 309. The disk flag 151in the device type flag 141 in the backup information table 140 is setto 1 in step 309 and processing proceeds to step 501 in FIG. 9. In step310, a check is made to determine whether the device type is that of anMT (magnetic tape, hereafter, abbreviated as MT) or an MT library(magnetic tape library, hereafter, abbreviated as MT library).

If the device type is not that of the MT or MT library as per step 310,processing proceeds to step 312. If the device type is that of the MT orMT library as per step 310, processing proceeds to step 311. The MT flag152 in the device type flag 141 in the backup information table 140 isset to 1 in step 311 and processing proceeds to step 601 in FIG. 10. Instep 312, the data backup abnormal termination is notified to theservice processor 22 via the bus 50 owing to an error. The flowchart ofFIG. 8 will be explained next. FIG. 8 illustrates an example of theprocessing flow after the notification on completion of data readingfrom the disk groups 91 and 92 is notified by the drive interfacecontrollers 81 to 84 in step 301 in FIG. 7.

In step 401, a check is made to determine whether the disk flag 151 inthe backup information table 140 is 1. If the disk flag 151 in thebackup information table 140 is “1” in step 401, the routine proceeds tostep 501 in FIG. 9 to perform the data backup for the disk. If the diskflag 151 in the backup information table 140 is not “1” in step 401, theroutine proceeds to step 402. In step 402, a determination whether theMT flag 152 in the backup information table 140 is 1 is performed. Ifthe MT flag in the backup information table 140 is 1 in step 402,processing proceeds to step 601 in FIG. 10. If the MT flag 152 in thebackup information table 140 is not 1 in step 402, processing proceedsto step 710 in FIG. 11.

The flowchart of FIG. 9 will be explained next. FIG. 9 illustrates anexample of the process flow for performing the data backup when the databackup-use external storage device 30 is that of a disk system. First,in step 501, a determination whether the volume name check flag 142 inthe backup information table 140 is 1 is performed. The volume namecheck flag 142 in the backup information table 140 is the flag whichindicates that the check of the volume name of the data backup-useexternal storage device 30 has been completed. If the volume name checkflag 142 in the backup information table 140 is “1” in step 501,processing proceeds to step 507. If the volume name check flag 142 inthe backup information table 140 is “0” in step 501, processing proceedsto step 502. In step 502, the volume name is read from the databackup-use external storage device 30.

A determination whether the volume name has been successfully read fromthe data backup-use external storage device 30 is performed in step 503.If the reading of the volume name of the data backup-use externalstorage device 30 has failed in step 503, processing proceeds to step710 in FIG. 11. If the volume name of the data backup-use externalstorage device 30 has been successfully read in step 503, processingproceeds to step 504. In step 504, a check is performed to determine tosee whether the volume name read from the data backup-use externalstorage device 30 coincides with the data backup-use external storagedevice volume name 123. If the volume name read from the data backup-useexternal storage device 30 does not coincide with the data backup-useexternal storage device volume name 123 in step 504, processing proceedsto step 710 in FIG. 11. If the volume name read from the data backup-useexternal storage device 30 coincides with the data backup-use externalstorage device volume name, processing proceeds to step 505. The volumename check flag 142 in the backup information table 140 is set to “1” instep 505. The current volume name 143 in the backup information table140 is newly set to the data backup-use external storage device volumename 123 in step 506.

In step 507, a check is performed to determine whether there is backupdata to be written into the data backup-use external storage device 30on the cache 70. When there is no backup data to be written into thedata backup-use external storage device 30 on the cache 70 in step 507,processing proceeds to step 509. When there is backup data to be writteninto the data backup-use external storage device 30 on the cache 70 instep 507, processing proceeds to step 508. The backup data is writteninto the data backup-use external storage device 30 in step 508 and theroutine returns to step 507.

A determination whether the data backup has been completed is performedin step 509. If the data backup has been completed in step 509,processing proceeds to step 801 in FIG. 12. If the data backup has notbeen completed in step 509, processing proceeds to step 510. In step510, the drive interface controllers 81 to 84 are instructed via the bus50 to read the backup data. After step 510 is done, processing returnsto step 301 in FIG. 7.

The flowchart in FIG. 10 will be explained next. FIG. 10 illustrates anexample of a processing flow for performing the data backup when thedata backup-use external storage device 30 is that of an MT system.First, in step 601, a determination whether the volume name check flag142 in the backup information table 140 is 1 is performed. If the volumename check flag 142 in the backup information table 140 is “1” in step601, processing proceeds to step 610. If the volume name check flag 142in the backup information table 140 is “0” in step 601, processingproceeds to step 602.

In step 602, a determination whether the data backup-use externalstorage device 30 is in the ready status is performed. If the databackup-use external storage device 30 is in the ready status in step602, processing proceeds to step 605. If the data backup-use externalstorage device 30 is not in the ready status in step 602, processingproceeds to step 603. A request for mounting the data backup-useexternal storage device volume name 123 is made to the data backup-useexternal storage device 30 in step 603 and processing proceeds to step604.

In step 604, a check is performed to determine whether the databackup-use external storage device 30 is in the ready status. If thedata backup-use external storage device 30 is in the ready status instep 604, processing proceeds to step 605. If the data backup-useexternal storage device 30 is not in the ready status in step 604,processing returns to step 604 and waits for the data backup-useexternal storage device 30 to enter the ready status. In step 605, thevolume name is read from the data backup-use external storage device 30.In step 606, a determination whether the volume name has beensuccessfully read from the data backup-use external storage device 30 isperformed. If the reading of the volume name of the data backup-useexternal storage device 30 has failed in step 606, processing proceedsto step 710 in FIG. 11. If the volume name of the data backup-useexternal storage device 30 has been successfully read in step 606,processing proceeds to step 607.

In step 607, a check is performed to determine whether the volume nameread from the data backup-use external storage device 30 coincides withthe data backup-use external storage device volume name 123. If thevolume name read from the data backup-use external storage device 30does not coincide with the data backup-use external storage devicevolume name 123 in step 607, processing proceeds to step 710 in FIG. 11.When the volume name read from the data backup-use external storagedevice 30 coincides with the data backup-use external storage devicevolume name 123 in step 607, processing proceeds to step 608. The volumename check flag 142 in the backup information table 140 is set to “1” instep 608. The current volume name 143 in the backup information table140 is newly set to the data backup-use external storage device volumename 123.

In step 610, a check is performed to determine whether there is backupdata to be written into the data backup-use external storage device 30on the cache 70. If there is no backup data to be written into the databackup-use external storage device 30 on the cache 70 in step 610,processing proceeds to step 510 in FIG. 9. When there is the backup datato be written into the data backup-use external storage device 30 on thecache 70 in step 610, processing proceeds to step 611. The backup datais written into the data backup-use external storage device 30 in step611 and processing proceeds to step 612. In step 612, a determinationwhether the data backup has been completed is performed. If the databackup has been completed in step 612, processing proceeds to step 901in FIG. 13. If the data backup has not been completed in step 612,processing proceeds to step 613.

In step 613, a check is performed to determine whether the databackup-use external storage device 30 is positioned at End of Time(E.O.T.) which indicates the termination of a magnetic tape. If the databackup-use external storage device 30 is positioned at the E.O.T. instep 613, processing proceeds to step 614. If the medium in the databackup-use external storage device 30 is not positioned at the E.O.T. instep 613, processing returns to step 610. In step 614, since the mediumin the data backup-use external storage device 30 is positioned atE.O.T., the magnetic tape has to be rewound. For this purpose, arewinding command is issued to the data backup-use external storagedevice 30.

In step 615, a determination whether the data backup-use externalstorage device 30 has completed the rewinding command execution isperformed. If the data backup-use external storage device 30 hascompleted execution of the rewinding command in step 615, processingproceeds to step 701 in FIG. 11. If the data backup-use external storagedevice 30 has not completed execution of the rewinding command in step615, processing returns to step 615 and waits for the end of executionof the rewinding command of the data backup-use external storage device30.

The flowchart of FIG. 11 will be explained next. FIG. 11 illustrates anexample of the processing flow for unloading a volume of a magnetic tapeand requesting a mounting of the next volume of the magnetic tape whenthe data backup-use external storage device 30 is that of an MT system.In step 701, an unloading command is issued to the data backup-useexternal storage device 30. In step 702, the MT mounting waiting flag144 in the backup information table 140 is set to 1. In step 703, avolume name obtained by adding 1 to the current volume name 143 in thebackup information table 140 is newly made the current volume name 143in the backup information table 140. Generally, the volume name of themagnetic tape is given by a combination of alphanumeric characters. Forexample, a magnetic tape volume name such as SSCO01 is typical. Morespecifically, in step 703, when the previous magnetic tape volume nameis SSCO01, the magnetic tape volume name of SSC0O2 is newly made thecurrent volume name 143 in the backup information table 140.

A request to mount the current volume name 143 in the backup informationtable 140 is made to the data backup-use external storage device 30 instep 704 and processing proceeds to step 705. In step 705, adetermination whether the data backup-use external storage device 30 isin the ready status is performed. When the data backup-use externalstorage device 30 is in the ready status in step 705, processingproceeds to step 706. When the data backup-use external storage device30 is not in the ready status in step 705, processing returns to step705 and waits the data backup-use external storage device 30 to enterthe ready status. In step 706, the volume name is read from the databackup-use external storage device 30.

In step 707, a determination whether the volume name has beensuccessfully read from the data backup-use external storage device 30 isperformed. If the reading of the volume name of the data backup-useexternal storage device 30 has failed in step 707, processing proceedsto step 710. If the reading of the volume name of the data backup-useexternal storage device 30 succeeded in step 707, processing proceeds tostep 708. In step 708, a determination whether the volume name read fromthe data backup-use external storage device 30 coincides with thecurrent volume name 143 in the backup information table 140 isperformed. When the volume name read from the data backup-use externalstorage device 30 does not coincide with the current volume name 143 inthe backup information table 140, processing proceeds to step 710. Whenthe volume name read from the data backup-use external storage device 30coincides with the current volume name 143 in the backup informationtable 140 in step 708, processing proceeds to step 709.

The MT mounting waiting flag 144 in the backup information table 140 isset to “0” in step 709 and the routine proceeds to step 610 in FIG. 10.In step 710, the backup information table 140 is cleared in order tocope with occurrence of an error. To be concrete, all of the device typeflag 141 (disk flag 151 and MT flag 152), the volume name check flag142, the current volume name 143, and the MT mounting waiting flag 144in the backup information table 140 are cleared. After completion of theprocessing of step 710, processing proceeds to step 312 in FIG. 7.

The flowchart in FIG. 12 will be explained next. FIG. 12 illustrates anexample of the processing flow after completion of the data backup tothe data backup-use external storage device 30. In step 801, the backupinformation table 140 is cleared. More specifically, all of the devicetype flag 141 (the disk flag 151 and MT flag 152), the volume name checkflag 142, the current volume name 143, and the MT mounting waiting flag144 in the backup information table 140 are cleared. The normaltermination of data backup is reported to the service processor 22 viathe bus 50 in step 802 and processing is returned to step 301 in FIG. 7.

The flowchart in FIG. 13 will be explained next. FIG. 13 illustrates anexample of a processing flow after completion of the data backup whenthe data backup-use external storage device 30 is that of the MT(magnetic tape) system. Since the MT is a portable medium, it isnecessary to unload the volume of the magnetic tape after completion ofthe data backup. In step 901, a rewinding command is issued to the databackup-use storage device 30 in order to rewind the magnetic tape.

In step 902, a determination whether the data backup-use externalstorage device 30 has completed the execution of the rewinding commandis performed. When execution of the rewinding command in the databackup-use external storage device 30 has been completed in step 902,processing proceeds to step 903. When the rewinding command execution inthe data backup-use external storage device 30 has not been completed instep 902, the routine returns to step 902 and waits for execution of theend of the rewinding command in the data backup-use external storagedevice 30. In step 903, an unloading command is issued to the databackup-use external storage device 30 in order to unload the volume ofthe magnetic tape and processing proceeds to step 801 in FIG. 12.

According to the embodiment, the data backup of the data on the externalstorage device 20 to the data backup-use external storage device 30 canbe executed between the external storage device 20 and the databackup-use external storage device 30 without the intervention of a hostdevice such as the large general purpose computer 1 and the personalcomputer 4, so that the load on the host device can be reduced. The databackup can be automatically performed between the external storagedevice 20 and the data backup-use external storage device 30 withoutrequiring the intervention of the host device such as the large generalcomputer 1 and the personal computer 4.

Further, various data saving operations such as, for example, saving ofany data from any motive in units of any data set such as a volume canbe performed irrespective of an occurrence of an error in the diskgroups 91 and 92 according to the control information set in theconfiguration information table 100 on the shared memory 60 in the diskarray subsystem 21.

In the embodiment, in order to simplify the explanation of theinvention, the explanation has been made in a situation where the databackup-use external storage device 30 is connected to the channelinterface controller 45 via the cable 14, the number of the backupobject volume addresses 120 in the backup information 103 in theconfiguration information table 100 is one that is, a single entryexists which includes the backup object volume address 120, the backupchannel interface controller name 121, the data backup-use externalstorage device address 122, the data backup-use external storage devicevolume name 123, and the data backup start time 124, and the backupchannel interface controller name 121 and the backup channel interfaceflag 102 are set to the channel interface controller 45. The inventioncan also be applied to a case where two or more backup object volumeaddresses 120 in the backup information 103 in the configurationinformation table 100 exist.

Thus, even if two or more entries exist each of which includes thebackup object volume address 120, the backup channel interfacecontroller name 121, the data backup-use external storage device address122, the data backup-use external storage device volume name 123, andthe data backup start time 124, two or more disk volumes and two or moremagnetic tape devices exist in the data backup-use external storagedevice 30, the invention can be applied.

The timer 130 is positioned in the service processor 22 in theembodiment. However, the invention can also be applied when the timer130 is positioned in the external storage device 20.

Furthermore, by providing a counter for the I/O (input/output) count(read/write I/O count or write I/O count) per volume or a counter tablefor the read/written byte count (or the written byte count will do also)and by referring to and updating the I/O counter table or theread/written byte counter table fore each volume on the shared memory 60when the function of the channel interface controllers 41 to 45 (thatis, execution of commands from the large general purpose computer 1 orthe personal computer 4 or data transfer between the large generalpurpose computer 1 or the personal computer 4 and the cache 70 using thebus 51) is executed, the I/O count per volume or the read/written bytecount per volume can be used instead of the timer 130 as the trigger tostart the data backup operation.

To use the I/O count per volume as the trigger, the question in the step304 in FIG. 7 should be changed to “Has the I/O count exceeded thespecified value?” and the instruction in step 801 in FIG. 12 should bechanged to “Clear the backup information table 140 and the I/O countertable of the volume concerned on the shared memory 60”.

To use the read/written byte counter as the trigger, the instruction instep 304 in FIG. 7 should be changed to “Check whether the read/writtenbyte count has exceeded the specified value of the byte count” and theinstruction in step 801 in FIG. 12 should be changed to “Clear thebackup information table 140 and the read/written byte counter table ofthe volume concerned on the shared memory 60”.

If the I/O count or the read/written byte count per volume illustratedas the trigger to start the backup is few, the data backups will beperformed frequently. The external storage device 20 does not accept theaccesses from the large general purpose computer 1 and the personalcomputer 4 during the backup, thus, the data transfer which is essentialis unable to be performed. That is, the more frequent the backups are,the lower the processing speed (performance) becomes. Therefore, it isdesirable to set the I/O count or read/written byte count per volume sothat the backup frequency is once a day, for example.

Concerning the embodiment, an explanation has been given for the examplein which the data backup-use external storage device 30 is connected tothe channel interface controller 45 via the cable 14. However, theinvention can also be applied to a case in which two or more databackup-use external storage devices 30 are connected to the channelinterface controller 45 via the cable 14. As for the cable 14, it is notlimited to a simple connection cable. For example, by using an arbitraryinformation network medium, the data backup can be executed between theexternal storage device 20 located in a remote place and the databackup-use external storage device 30.

Further, with respect to the embodiment, an explanation has been givenfor the example in which the single data backup-use external storagedevice 30 is connected to the single external storage device 20 via thesingle channel interface controller 45 has been explained. However, itwill be clearly understood that the invention can be applied to a caseof a configuration in which two or more data backup-use external storagedevices 30 are connected to one external storage device 20 via two ormore channel interface controllers.

The embodiment is an example of a case in which the external storagedevice 20 is connected to the two host devices (one large generalpurpose computer and four personal computers). However, it will beobviously understood that the invention can also be applied to aconfiguration in which the three or more host devices are connected tothe external storage device 20 or a configuration in which the one hostdevice is connected to the external storage device 20.

Even further, concerning the embodiment, an explanation has been givenusing the magnetic disk array subsystem as an example in the embodiment.However, it will obviously be understood that the invention can beapplied to an external storage subsystem of other type such as asemiconductor storage subsystem, an optical disk subsystem, a magnetictape subsystem, a magnetic tape library subsystem, an optical disklibrary subsystem, or the like. An external storage device has been usedas an example in the embodiment, however, it will obviously beunderstood that the invention can be applied to the external storagecontroller.

According to the data saving operation of the invention, an effect isobtained that the data saving can be performed between the externalstorage devices without increasing a load on the host device.

While the present invention has been described in detail and pictoriallyin the accompanying drawings, it is not limited to such details sincemany changes and modification recognizable to these of ordinary skill inthe art having the benefit of this invention may be made to theinvention without departing from the spirit and scope of the invention,and all such modifications as would be obvious to one skilled in the artand/or which become possible as technology develops, are intended to beincluded within the scope of the following claims.

We claim:
 1. A data backup method in a first external storage deviceconnected to a host device, said data backup method comprising: forminga connection between said first external storage device and a secondexternal storage device; and copying data stored in said first externalstorage device to said second external storage device via saidconnection, wherein said copying step is performed based on a databackup start time in configuration information stored in said firstexternal storage device, wherein said copying step is performed when acurrent time of a timer corresponds to said data backup start time andsaid copying step is over when said data backup has been completed,wherein said configuration information comprises a type of device flagwhich indicated whether said second external storage device is amagnetic tape type storage device, wherein said copying step isperformed corresponding to a type of storage device indicated by saidtype of device flag, and wherein said copying step can be performedindependent of said host device.
 2. A data backup method according toclaim 1, wherein said configuration information further comprises:information for designating at least one of a data storing area and adata set name in the said second external storage device at which saidstored data is to be stored, and information which indicates at leastone type of second external storage device.
 3. An external storagedevice for storing data from a host and backing up stored data to abackup storage device, said external storage device comprising: a firstinput/output port for inputting/outputting of data to and/or from ahost; a second input/output port, for connection to the backup storagedevice, for backing up stored data to the backup storage device; acontroller for controlling operation of said first and secondinput/output ports based on configuration information to cause copyingof data stored in said external storage device from the host to saidbackup storage device via said second input/output port; and a processorin said external storage device for instructing an execution of saidbackup operation to said controller, wherein said configurationinformation comprises information for designating at least one of a datastoring area and a data set name in the said backup storage device atwhich stored data is to be stored information of at least one type ofstorage device for managing with said second external storage device,and information including a data backup start time and a type of deviceflag which indicates whether said second external storage device is amagnetic tape type storage device, wherein said copying from saidexternal storage device to said backup storage device can be performedindependent of said host, and wherein said copying is performedcorresponding to a type of storage device indicated by said type ofdevice flag.
 4. An external storage device according to claim 3, whereinsaid configuration information comprises: information for designating atleast one of a data storing area and a data set name in the said backupstorage device at which said stored data is to be stored and informationfor managing at least one type of backup storage device.
 5. A databackup method according to claim 2, further comprising: inputting saidconfiguration information.
 6. A data backup method in a first externalstorage device to be connected to a host device which performs datainput and/or output operations to and/or from said first externalstorage device, said data backup method comprising: checking a currenttime of a timer in the first external storage; and copying data storedin said first storage device to said second external storage device viaa connection formed between said first external storage device and saidsecond external storage device when the current time corresponds to adata backup start time included in configuration information stored insaid first external storage device and said copying step is over whensaid data backup has been completed, wherein said configurationinformation comprises a type of device flag which indicates whether saidsecond external storage device is a magnetic tape type storage device,wherein said copying step is performed corresponding to a type ofstorage device indicated by said type of device flag, and wherein saidcopying step can be performed independent of said host device.
 7. A databackup method in a first external storage device connecting to a hostdevice, said data backup method comprising: forming a connection betweensaid first external storage device and a second external storage device;and copying data stored in said first external storage device to saidsecond external storage device via said connection, wherein said copyingstep is performed referring a present time of a timer in said firstexternal device an a data backup start time included in configurationinformation and said copying step is over when said data backup has beencompleted, wherein said configuration information comprises a type ofdevice flag which indicates whether said second external storage deviceis a magnetic tape type storage device, wherein said copying step isperformed corresponding to a type of storage device indicated by saidtype of device flag, and wherein said copying step can be performedindependent of said host device.